<template>
<div class="main">
	<content_top title="登录日志"></content_top>
	<div class="g_box">
		<div class="g_head">
			<h3>数据列表</h3>
		</div>
		<div class="g_box_con">
			<Table :columns="Columns" :data="list" style="width: 100%;" border >
				<div slot="footer" style="border-top: 1px solid #eee;padding: 0 10px; text-align: right;    font-size: 14px;">
					
					<div style="float:right;">
						<Page :total="count" show-elevator show-total @on-change="goto_page" />
					</div>
				</div>
			</Table>
		</div>
	</div>
</div>
</template>

<script>
import content_top from '@/themes/components/content_top';

export default {
    data () {
		var self = this;
        return {
            Columns: [
				{
					title: '时间',
					key: 'addtime',
					align: 'center',
                    width: 200
                },
				{
                    title: 'IP',
					key: 'ip',
					align: 'center',
					width: 200,
                },
				{
                    title: '地区',
					key: 'region',
					width: 200,
                },
				{
                    title: '浏览器',
					key: 'device',
                },
            ],
			list:[],
			page:1,
			count:0
        };
    },
	components:{
		content_top
	},
	created(){
		this.load_data();
	},
    methods: {
		load_data(){
			var self = this;
			var postdata = {
				page:this.page
			};
			Whttp.load('Admin/Login_log/get_list',postdata,function(result){
				self.list = result.list;
				self.count = parseInt(result.count);
			});
		},
		goto_page(page){
			this.page = page;
			this.load_data();
		}
    }
};
</script>

